import 'package:get/get.dart';
import 'package:number_spark_flutter/db_manager/bean/ns_record_bean.dart';
import 'package:number_spark_flutter/utils/ns_db_utils.dart';
import 'package:number_spark_flutter/utils/ns_user_utils.dart';

const String idRecordList = 'recordList';
const String idStatistics = 'statistics';

class NSRecordLogic extends GetxController {
  List<NSRecordBean> recordList = [];

  onGetRecordList() async {
    List<NSRecordBean> tempList = await NSDBUtils.instance.daoRecord.queryByUserId(NSUserUtils.getId()) ?? [];
    recordList = tempList;
    update([idRecordList, idStatistics]);
  }
}
